.sidepanel-layout {
  height: 100vh;
  background-color: #f5f5f5;
  
  .sidepanel-header {
    background: linear-gradient(135deg, #1890ff, #36cfc9);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .sidepanel-content {
    padding: 16px;
    overflow-y: auto;
    
    .content-area {
      max-height: calc(100vh - 320px);
      overflow-y: auto;
    }
  }
  
  // 标签页信息样式
  .tab-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    
    .tab-details {
      flex: 1;
      min-width: 0;
      
      .ant-typography {
        display: block;
        margin: 0;
      }
    }
  }
  
  // 书签和历史记录项样式
  .bookmark-item,
  .history-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 8px;
    margin: 4px 0;
    
    &:hover {
      background-color: #f0f8ff;
      transform: translateX(2px);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .ant-list-item-meta {
      align-items: flex-start;
      
      .ant-list-item-meta-avatar {
        margin-right: 8px;
      }
      
      .ant-list-item-meta-content {
        .ant-list-item-meta-title {
          margin-bottom: 4px;
          line-height: 1.2;
        }
        
        .ant-list-item-meta-description {
          line-height: 1.2;
        }
      }
    }
  }
  
  // 搜索框样式
  .ant-input-search {
    .ant-input {
      border-radius: 20px;
    }
    
    .ant-input-search-button {
      border-radius: 0 20px 20px 0;
    }
  }
  
  // 列表样式
  .ant-list {
    .ant-list-item {
      border: none;
      padding: 0;
    }
    
    .ant-empty {
      padding: 20px 0;
    }
  }
  
  // 卡片样式
  .ant-card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    
    &.ant-card-small {
      .ant-card-head {
        padding: 8px 12px;
        min-height: auto;
        
        .ant-card-head-title {
          font-size: 14px;
          font-weight: 600;
        }
      }
      
      .ant-card-body {
        padding: 12px;
      }
    }
  }
  
  // 按钮组样式
  .ant-space {
    &.ant-space-horizontal {
      .ant-space-item {
        .ant-btn {
          border-radius: 16px;
          
          &.ant-btn-primary {
            box-shadow: 0 2px 4px rgba(24, 144, 255, 0.3);
          }
        }
      }
    }
  }
  
  // 头像样式
  .ant-avatar {
    border: 1px solid #f0f0f0;
    
    &.ant-avatar-image {
      background-color: #fff;
    }
  }
  
  // 徽章样式
  .ant-badge {
    .ant-badge-count {
      font-size: 10px;
      min-width: 16px;
      height: 16px;
      line-height: 16px;
    }
  }
  
  // 滚动条样式
  &::-webkit-scrollbar,
  .content-area::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track,
  .content-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }
  
  &::-webkit-scrollbar-thumb,
  .content-area::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
    
    &:hover {
      background: #a8a8a8;
    }
  }
  
  // 响应式设计
  @media (max-width: 400px) {
    .sidepanel-content {
      padding: 12px;
    }
    
    .tab-info {
      flex-direction: column;
      gap: 4px;
    }
    
    .bookmark-item,
    .history-item {
      padding: 6px;
      
      .ant-list-item-meta-avatar {
        margin-right: 6px;
      }
    }
  }
  
  // 深色主题
  &.dark-theme {
    background-color: #141414;
    
    .sidepanel-header {
      background: linear-gradient(135deg, #1677ff, #13c2c2);
    }
    
    .ant-card {
      background-color: #1f1f1f;
      border-color: #303030;
      
      .ant-card-head {
        background-color: #1f1f1f;
        border-bottom-color: #303030;
      }
    }
    
    .bookmark-item,
    .history-item {
      &:hover {
        background-color: #262626;
      }
    }
    
    .ant-input-search {
      .ant-input {
        background-color: #262626;
        border-color: #434343;
        color: #fff;
        
        &:focus {
          border-color: #1677ff;
          box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2);
        }
      }
    }
  }
}